/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.xcxAdmin.service;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeesite.common.entity.Page;
import com.jeesite.common.service.CrudService;
import com.jeesite.modules.xcxAdmin.dao.ZtGoodsqcodeDao;
import com.jeesite.modules.xcxAdmin.entity.ZtGoodsqcode;

/**
 * 测试数据Service
 * 
 * @author ThinkGem
 * @version 2018-04-22
 */
@Service
@Transactional(readOnly = true)
public class ZtGoodsqcodeService extends CrudService<ZtGoodsqcodeDao, ZtGoodsqcode> {
	
	
	
	/**
	 * 获取单条数据
	 * 
	 * @param testData
	 * @return
	 */
	@Override
	public ZtGoodsqcode get(ZtGoodsqcode ztGoodsqcode) {
		ZtGoodsqcode entity = super.get(ztGoodsqcode);
		if (entity == null) {
			entity = new ZtGoodsqcode();
		}
		return entity;
	}
	
	
	public ZtGoodsqcode getByBid(ZtGoodsqcode ztGoodsqcode) {
		return dao.getByBid(ztGoodsqcode);
	}
	
	public ZtGoodsqcode getByGoodsAdminid(ZtGoodsqcode ztGoodsqcode) {
		return dao.getByGoodsAdminid(ztGoodsqcode);
	}
	
	/**
	 * 查询分页数据
	 * 
	 * @param page
	 *            分页对象
	 * @param testData
	 * @return
	 */
	@Override
	public Page<ZtGoodsqcode> findPage(Page<ZtGoodsqcode> page, ZtGoodsqcode ztGoodsqcode) {
		return super.findPage(page, ztGoodsqcode);
	}

	/**
	 * 保存数据（插入或更新）
	 * 
	 * @param testData
	 */
	@Override
	@Transactional(readOnly = false)
	public void save(ZtGoodsqcode ztGoodsqcode) {
		super.save(ztGoodsqcode);
		
	}
	
	@Transactional(readOnly = false)
	public long saveinsert(ZtGoodsqcode ztGoodsqcode) {
		return dao.saveinsert(ztGoodsqcode);
	}
	
	
	@Transactional(readOnly = false)
	public long updateSave(ZtGoodsqcode ztGoodsqcode) {
		return dao.updateSave(ztGoodsqcode);
	}
	

	/**
	 * 删除数据
	 * 
	 * @param testData
	 */
	@Override
	@Transactional(readOnly = false)
	public void delete(ZtGoodsqcode ztGoodsqcode) {
		super.delete(ztGoodsqcode);
	}
	
	
	

}